package com.kdzy.lshy.socity_server.common;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 七牛云 - 配置类
 * @author cly
 * @since 2018-07-01
 */
@Configuration
@PropertySource(value = "classpath:qiniu.properties")
public class QiNiuConfig {

    @Value("${accessKey}")
    private String accessKey;

    @Value("${secretKey}")
    private String secretKey;

    @Value("${bucket}")
    private String bucket;

    @Value("${path}")
    private String path;

    @Bean
    public QiNiu getInstance(){
        QiNiu qiNiu =new QiNiu(accessKey, secretKey, bucket, path);
        return qiNiu;
    }


}
